LKSM: Multivalue text choice automation: Assays#7511
LKSM: Multivalue text choice automation: Assays#7511
Conversation
no formatting
| import static org.labkey.test.util.samplemanagement.SMTestUtils.COL_ASSAY_ID_LABEL; | ||
| import static org.labkey.test.util.samplemanagement.SMTestUtils.COL_MULTITEXTCHOICE; | ||
| import static org.labkey.test.util.samplemanagement.SMTestUtils.TEXT_MULTI_CHOICE_LIST; |
There was a problem hiding this comment.
Unless there is a matching dependency between the modules themselves, tests for one module shouldn't import anything from tests for another module.
Referring to code in a private repository from code in a public repository is especially unwanted. The community suites can't run with this sort of import present.
This test should just define its own multi-text choice column.
| ReactAssayDesignerPage assayDesignerPage = _assayHelper.createAssayDesign("General", MVTC_MULTI_FILE_IMPORT_ASSAY); | ||
|
|
||
| assayDesignerPage.goToResultsFields() | ||
| .removeAllFields(false) | ||
| .addField(COL_MULTITEXTCHOICE.getFieldDefinition()); | ||
|
|
||
| assayDesignerPage.clickFinish(); |
There was a problem hiding this comment.
Create this assay via API.
| .containsExactlyInAnyOrderElementsOf(expectedValues)); | ||
| } | ||
|
|
||
| private String buildFileContent(List<List<String>> fileData) |
There was a problem hiding this comment.
This method's functionality is much more specialized than the method name implies. The name should reflect the specific purpose of this method. Also, it should just return the file since that's how this is always used.
| private String buildFileContent(List<List<String>> fileData) | |
| private File writeMultiValueTextForAssayRun(List<List<String>> multiValueSelections) |
| List<String> expectedValues = Stream.concat(fileDataFirstImport.stream(), fileDataSecondImport.stream()) | ||
| .map(values -> TestArrayDataUtils.sortAndJoin(values, " ")) | ||
| .toList(); | ||
| checker().wrapAssertion(() -> Assertions.assertThat(assayRunsPage.clickViewResults().getDataTable().getColumnDataAsText(COL_MULTITEXTCHOICE.getLabel())) |
There was a problem hiding this comment.
Use column labels as a last resort.
| checker().wrapAssertion(() -> Assertions.assertThat(assayRunsPage.clickViewResults().getDataTable().getColumnDataAsText(COL_MULTITEXTCHOICE.getLabel())) | |
| checker().wrapAssertion(() -> Assertions.assertThat(assayRunsPage.clickViewResults().getDataTable().getColumnDataAsText(COL_MULTITEXTCHOICE)) |
Rationale
Test Multiple files import for Assays in Labkey Server with MVTC.
Related Pull Requests